import pymongo
import time

client = pymongo.MongoClient(host='192.168.2.159', port=27017)
# 选择数据库
db = client.big
# 选择集合
collection = db.txt

start_time = time.time()
results = collection.find({"sentence": {"$regex": "^.你好.再见.$"}})
for result in results:
	print(result)
end_time = time.time()
print("time long --->", end_time - start_time)
